using System;
using System.Collections.Generic;
using System.Linq;
using SqlSugar;

namespace Blog.Repository;


/// <summary>
/// 接口管理
///</summary>
[SugarTable("ad_api")]
public class ApiEntity : EntityFull
{

    /// <summary>
    /// 主键Id
    ///</summary>
    [SugarColumn(ColumnName = "Id", IsPrimaryKey = true)]
    public long Id { get; set; }
    
    /// <summary>
    /// 所属模块
    ///</summary>
    [SugarColumn(ColumnName = "ParentId")]
    public long ParentId { get; set; }
    
    /// <summary>
    /// 接口命名
    ///</summary>
    [SugarColumn(ColumnName = "Name")]
    public string? Name { get; set; }
    
    /// <summary>
    /// 接口名称
    ///</summary>
    [SugarColumn(ColumnName = "Label")]
    public string? Label { get; set; }
    
    /// <summary>
    /// 接口地址
    ///</summary>
    [SugarColumn(ColumnName = "Path")]
    public string? Path { get; set; }
    
    /// <summary>
    /// 接口提交方法
    ///</summary>
    [SugarColumn(ColumnName = "HttpMethods")]
    public string? HttpMethods { get; set; }
    
    /// <summary>
    /// 说明
    ///</summary>
    [SugarColumn(ColumnName = "Description")]
    public string? Description { get; set; }
    
    /// <summary>
    /// 排序
    ///</summary>
    [SugarColumn(ColumnName = "Sort")]
    public int Sort { get; set; }
    
    /// <summary>
    /// 启用
    ///</summary>
    [SugarColumn(ColumnName = "Enabled")]
    public bool Enabled { get; set; }
    
    /// <summary>
    /// 版本
    ///</summary>
    [SugarColumn(ColumnName = "Version")]
    public long Version { get; set; }


    [SugarColumn(IsIgnore = true)]
    public List<ApiEntity> Children { get; set; }
}
